<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
      <title>GTL - Graph Template Library: edge.h Source File</title>
      <link href="doxygen.css" rel="stylesheet" type="text/css">
  </head>
  <body>
    <p class="links">  
      <a href="../index.html">Home</a> |
      Documentation |
      <a href="../register.html">Download</a> |
      <a href="../platforms.html">Platforms</a> |
      <a href="../refer.html">Projects</a> |      
      <a href="../lists.html">Mailing Lists</a> |
      <a href="../history.html">Version History</a>
    </p>

<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>edge.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//==========================================================================</span>
<a name="l00002"></a>00002 <span class="comment">//</span>
<a name="l00003"></a>00003 <span class="comment">//   edge.h</span>
<a name="l00004"></a>00004 <span class="comment">//</span>
<a name="l00005"></a>00005 <span class="comment">//==========================================================================</span>
<a name="l00006"></a>00006 <span class="comment">// $Id: edge.h,v 1.15 2001/04/17 14:35:25 raitner Exp $</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef GTL_EDGE_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define GTL_EDGE_H</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;GTL/GTL.h&gt;</span>
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 __GTL_BEGIN_NAMESPACE
<a name="l00016"></a>00016  
<a name="l00017"></a>00017 <span class="comment">//--------------------------------------------------------------------------</span>
<a name="l00018"></a>00018 <span class="comment">//   For MSVC 5.0 edge.h has to be included before node.h and</span>
<a name="l00019"></a>00019 <span class="comment">//   {node,edge}_data.h. So we only declare needed classnames here</span>
<a name="l00020"></a>00020 <span class="comment">//--------------------------------------------------------------------------</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="keyword">class </span><a class="code" href="a00020.html" title="A node in a graph.">node</a>;
<a name="l00023"></a>00023 <span class="keyword">class </span>edge_data;
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="comment">//--------------------------------------------------------------------------</span>
<a name="l00026"></a>00026 <span class="comment">//   edge</span>
<a name="l00027"></a>00027 <span class="comment">//--------------------------------------------------------------------------</span>
<a name="l00028"></a>00028 
<a name="l00032"></a><a class="code" href="a00010.html">00032</a> <span class="keyword">class </span>GTL_EXTERN <a class="code" href="a00010.html" title="An edge in a graph.">edge</a>
<a name="l00033"></a>00033 {
<a name="l00034"></a>00034 <span class="keyword">public</span>:
<a name="l00051"></a>00051     <a class="code" href="a00010.html" title="An edge in a graph.">edge</a>();
<a name="l00052"></a>00052 
<a name="l00058"></a>00058     <a class="code" href="a00020.html" title="A node in a graph.">node</a> source() <span class="keyword">const</span>;
<a name="l00059"></a>00059 
<a name="l00065"></a>00065     <a class="code" href="a00020.html" title="A node in a graph.">node</a> target() <span class="keyword">const</span>;
<a name="l00066"></a>00066 
<a name="l00070"></a>00070     <span class="keywordtype">void</span> reverse ();
<a name="l00071"></a>00071 
<a name="l00077"></a>00077     <span class="keywordtype">void</span> change_source (<a class="code" href="a00020.html" title="A node in a graph.">node</a> n);
<a name="l00078"></a>00078 
<a name="l00084"></a>00084     <span class="keywordtype">void</span> change_target (<a class="code" href="a00020.html" title="A node in a graph.">node</a> n);
<a name="l00085"></a>00085 
<a name="l00092"></a>00092     <span class="keyword">const</span> <a class="code" href="a00020.html" title="A node in a graph.">node</a>&amp; opposite(<a class="code" href="a00020.html" title="A node in a graph.">node</a> n) <span class="keyword">const</span>;
<a name="l00093"></a>00093 
<a name="l00097"></a>00097     list&lt;node&gt; sources() <span class="keyword">const</span>;
<a name="l00098"></a>00098 
<a name="l00102"></a>00102     list&lt;node&gt; targets() <span class="keyword">const</span>;
<a name="l00103"></a>00103 
<a name="l00107"></a>00107     <span class="keywordtype">int</span> id() <span class="keyword">const</span>;
<a name="l00108"></a>00108 
<a name="l00109"></a>00109     
<a name="l00117"></a>00117     <span class="keywordtype">bool</span> is_hidden () <span class="keyword">const</span>;
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 
<a name="l00120"></a>00120     <span class="comment">//================================================== Implementation</span>
<a name="l00121"></a>00121     
<a name="l00122"></a>00122 <span class="keyword">private</span>:
<a name="l00123"></a>00123     edge_data *data;
<a name="l00124"></a>00124     
<a name="l00125"></a>00125     <span class="keywordtype">void</span> remove_from(<span class="keywordtype">int</span> where) <span class="keyword">const</span>; <span class="comment">// 0 = sources, 1 == targets</span>
<a name="l00126"></a>00126 
<a name="l00127"></a>00127     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00014.html" title="A directed or undirected graph.">graph</a>;
<a name="l00128"></a>00128     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00020.html" title="A node in a graph.">node</a>;
<a name="l00129"></a>00129     
<a name="l00130"></a>00130     GTL_EXTERN <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator==(<a class="code" href="a00010.html" title="An edge in a graph.">edge</a>, <a class="code" href="a00010.html" title="An edge in a graph.">edge</a>);
<a name="l00131"></a>00131     GTL_EXTERN <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator!=(<a class="code" href="a00010.html" title="An edge in a graph.">edge</a>, <a class="code" href="a00010.html" title="An edge in a graph.">edge</a>);
<a name="l00132"></a>00132     GTL_EXTERN <span class="keyword">friend</span> <span class="keywordtype">bool</span> operator&lt;(<a class="code" href="a00010.html" title="An edge in a graph.">edge</a>, <a class="code" href="a00010.html" title="An edge in a graph.">edge</a>);
<a name="l00133"></a>00133     GTL_EXTERN <span class="keyword">friend</span> ostream&amp; operator&lt;&lt; (ostream&amp; os, <span class="keyword">const</span> <a class="code" href="a00010.html" title="An edge in a graph.">edge</a>&amp; e);
<a name="l00134"></a>00134 };
<a name="l00135"></a>00135 
<a name="l00136"></a>00136 __GTL_END_NAMESPACE
<a name="l00137"></a>00137 
<a name="l00138"></a>00138 <span class="preprocessor">#endif // GTL_EDGE_H</span>
<a name="l00139"></a>00139 <span class="preprocessor"></span>
<a name="l00140"></a>00140 <span class="comment">//--------------------------------------------------------------------------</span>
<a name="l00141"></a>00141 <span class="comment">//   end of file</span>
<a name="l00142"></a>00142 <span class="comment">//--------------------------------------------------------------------------</span>
</pre></div>    <p class="links">
      <a href="http://www.uni-passau.de/">University of Passau</a>
      &nbsp;-&nbsp;
      <a href="http://www.fmi.uni-passau.de/">FMI</a>
      &nbsp;-&nbsp;
      <a href="http://www.fmi.uni-passau.de/fmi/lehrstuehle/brandenburg/">Theoretical
	Computer Science</a>
    </p>
  <div class="copyright">
      Design &copy; 2002, 2003 <a href="mailto:raitner@fmi.uni-passau.de">Marcus Raitner</a>,  University of Passau 
  </div>
</body>
</html>
